Component({
    properties: {
      activeIndex: Number
    },
    data: {
      tabs: [
        { icon: '/images/tabbar/home.png', page: '/pages/index/index' },
        { icon: '/images/tabbar/cart.png', page: '/pages/cart/cart' },
        { icon: '/images/tabbar/map.png', page: '/pages/map-pet/map-pet' },
        { icon: '/images/tabbar/settings.png', page: '/pages/settings/settings' }
      ]
    },
    methods: {
      onTabClick(e) {
        const index = e.currentTarget.dataset.index;
        if (index === this.properties.activeIndex) return;
        this.triggerEvent('change', { index });
      }
    }
  });
  